<template>
	<view>
		<button @click="loginOut">退出登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods: {
			async loginOut() {
				console.log('退出登录');
				let re = await this.$API.authApi.logout();
				
				/*  */
				uni.clearStorageSync()
				/*  */
				this.$ws.completeClose();
				this.$store.state.isOpenSocket = false;
				/*  */
				// uni.removeStorage()
				// uni.removeStorageSync('token')
				// uni.removeStorageSync('userInfo')
				// uni.removeStorageSync('ID')
				uni.reLaunch({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss">

</style>